<extend name="template/base_index" />

<block name="area_header">
<style type="text/css">
	textarea{resize: none;}
</style>
</block>

<block name="area_body">
	{:W('Menus/topbar')}
	<div class="admin-main container-fluid">
		{:W('Menus/left')}
		<div class="admin-main-content">
			{:W('Menus/breadcrumb')}
			<h3>小黑屋管理</h3>
			<div class="member_access">
				<blockquote><p class="text-primary"><eq name="allowbanuser" value="1">设置或取消禁言用户<else/>当前登陆帐号没有权限禁言用户</eq></p></blockquote>
				<eq name="allowbanuser" value="1">
				<form class="form-inline" method="get" name="access" action="{:U('Admin/BbsMember/banUser')}">
					<div class="form-group">
						<label class="control-label">搜索昵称或ID:</label>
						<div class="input-group">
							<input class="form-control input-sm" type="text" name="key" placeholder="请输入昵称或ID">
						</div>
					</div>
					<button class="btn btn-primary btn-sm"><i class="fa fa-search"></i>查找</button>
					<div class="form-group">
						<label>禁言状态</label>
						<label class="radio-inline">
							<input type="radio" name="allowpost" value="1" <eq name="allowpost" value="1">checked="checked"</eq> class="allowpost">正常
						</label>
						<label class="radio-inline">
							<input type="radio" name="allowpost" value="0" <eq name="allowpost" value="0">checked="checked"</eq> class="allowpost">已禁言
						</label>
					</div>
				</form>
				<table class="table table-striped table table-hover  table-condensed">
					<thead>
					<tr>
						<th>
							UID
						</th>
						<th>
							昵称
						</th>
						<th>
							状态
						</th>
						<th>
							论坛
						</th>
						<th>
							{:L('OPERATOR')}
						</th>
					</tr>
					</thead>
					<tbody>
					<empty name="list">
						<tr>
							<td colspan="8" class="text-center">{:L('NO_DATA')}</td>
						</tr>
						<else/>
						<volist name="list" id="vo">
							<tr>
								<td>
									{$vo.id}</td>
								<td>
									<a href="{:U('Admin/CustomerInfo/index',array('id'=>$vo['id']))}">{$vo.nickname|default='未知昵称'}</a></td>

								<td><eq name="vo.allowpost" value="0">禁言<else/>正常</eq></td>
								<td>
									<if condition="$vo.allowpost eq 0">
										<eq name="vo.fid" value="0">所有论坛<else />{$vo.forum_name|default='无'}</eq>
										<else/>
										无
									</if>

								</td>
								<td>
									<a href="{:U(CONTROLLER_NAME .'/ban',array('uid'=>$vo['id'],'allow'=>1))}" class="btn btn-danger btn-sm ajax-get confirm" >禁言</a>
									<a href="{:U(CONTROLLER_NAME .'/ban',array('uid'=>$vo['id'],'allow'=>0))}" class="btn btn-primary btn-sm ajax-get confirm" >解除禁言</a>
								</td>
							</tr>

						</volist>
					</empty>
					</tbody>
				</table>
				<div>{$show}</div>
				</eq>
			</div>
		</div>
		<!-- END admin-main-content -->
	</div>
		<!-- END admin-main-->
</block>

<block name="area_footer">
	<script>
		$(".allowpost").click(function () {

			$("form[name='access']").submit();
		});
	</script>
</block>
